<div class="row-fluid">
    <div class="span12">
        <div class="well well-small"><i class="icon-user"></i>&nbsp;${user.lastName} ${user.firstName}</div>
            <span class="pull-right"><small><@item_navigation item_navigator=item_navigator /></small></span>
            <ul class="nav nav-tabs">
                <li>
                    <a href="jsp/admin/user/ModifyUser.jsp?id_user=${user.userId}" >#i18n{portal.users.actions.labelUser}</a>
                </li>
                <li class="active"><a href="jsp/admin/user/ModifyUserRights.jsp?id_user=${user.userId}">#i18n{portal.users.actions.labelRights}</a></li>
                <li><a href="jsp/admin/user/ModifyUserRoles.jsp?id_user=${user.userId}">#i18n{portal.users.actions.labelRoles}</a></li>
                <li><a href="jsp/admin/user/ModifyUserWorkgroups.jsp?id_user=${user.userId}">#i18n{portal.users.actions.labelWorkgroups}</a></li>
            </ul>
            <#if can_delegate = 'true'><p>#i18n{portal.users.modify_user_rights.informationRightModification}</p></#if>
			<form method="post"  action="jsp/admin/user/ModifyUserRights.jsp" class="form-inline pull-right spaced">    
                <input type="hidden" name="delegate_rights" value="${can_delegate}" />
                <input type="hidden" name="id_user" value="${user.userId}" />
                <input type="hidden" name="select" value="all" />
                <button type="submit" class="btn btn-primary btn-small" />
				<i class="icon-filter icon-white"></i>#i18n{portal.users.modify_user_rights.buttonLabelSelectAll}</button>
            </form>
		    <form method="post"  action="jsp/admin/user/DoModifyUserRights.jsp" class="form-horizontal"> 
                <fieldset>	
                    <legend>#i18n{portal.users.modify_user_rights.titleRightModificationForm}
					<button type="submit" class="btn btn-primary btn-small pull-right" >
						<i class="icon-ok icon-white"></i>&nbsp;#i18n{portal.users.modify_user_rights.buttonLabelModifyRights}
					</button>
					</legend>
					
                    <input type="hidden" name="delegate_rights" value="${can_delegate}" />
                    <ul class="unstyled">
                        <#list all_right_list?sort_by('name') as right>
                        <#if select_all = true >
							<#assign checked >checked="checked"</#assign>
                        <#else>
							<#assign checked = "" >
							<#list user_right_list as user_right>
								<#if user_right.id = right.id >
									<#assign checked >checked="checked"</#assign>
									<#break>
								</#if>
							</#list>
                        </#if>
                        <li>
                            <div class="controls">	
                                <label class="checkbox">${right.name} (#i18n{portal.users.modify_user_rights.labelLevel} ${right.level}) - ${right.description}
                                    <input class="checkbox" type="checkbox" name="right" value="${right.id}" ${checked} />
                                </label>
                            </div>
                        </li>
                        </#list>        
                    </ul>
                    <input type="hidden" name="id_user" value="${user.userId}" />
                    <div class="form-actions">
                       <button type="submit" class="btn btn-primary btn-small" >
							<i class="icon-ok icon-white"></i>&nbsp;#i18n{portal.users.modify_user_rights.buttonLabelModifyRights}
						</button>
                    </div>
                    <fieldset>
			</form>
    </div>
</div>